package com.rays.gank.ext

import android.util.Log
import com.rays.gank.util.LogUtil

fun String.logD(tag: String = LogUtil.DEFAULT_TAG) =
    LogUtil.printLog(this, tag, priority = Log.DEBUG)

fun String.logI(tag: String = LogUtil.DEFAULT_TAG) =
    LogUtil.printLog(this, tag, priority = Log.INFO)

fun String.logW(tr: Throwable, tag: String = LogUtil.DEFAULT_TAG) =
    LogUtil.printLog(this, tag, tr, priority = Log.WARN)

fun String.logE(tr: Throwable, tag: String = LogUtil.DEFAULT_TAG) =
    LogUtil.printLog(this, tag, tr, priority = Log.ERROR)
